package com.lyw.log.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/log")
@RestController
public class LogController {

    Logger logger = LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/print")
    public String print() {
        System.out.println("sout打印日志");
        logger.info("info打印日志");

        logger.trace("trace打印日志");
        logger.debug("debug打印日志");
        logger.info("info打印日志");
        logger.warn("warn打印日志");
        logger.error("error打印日志");

        return "打印日志成功";
    }
}
